package com.yuw.service.userinfo.impl;

import com.yuw.bean.userinfo.UserInfoBean;
import com.yuw.dao.userinfo.UserInfoBeanMapper;
import com.yuw.service.userinfo.IUserInfoSerivice;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class UserInfoService implements IUserInfoSerivice {
    // 依赖注入dao层
    @Resource
    private UserInfoBeanMapper userInfoBeanMapper;

    @Override
    public boolean doLogin1(String userName, String userPsw) {
        // 调用dao层进行数据库操作
        List<UserInfoBean> lstUsers = userInfoBeanMapper.doLogin1(userName, userPsw);
        // 判断是否登录成功，并返回结果
        return lstUsers != null && lstUsers.size() > 0;
    }

    @Override
    public boolean doLogin(UserInfoBean userInfoBean) {
        return false;
    }
}
